#include <stdio.h>

void decompose(double x, long *int_part, double *frac_part);

int main(void)
{
    double i = 3.14159;
    long j;
    double k;

    decompose(i, &j, &k);
    printf("%ld\n", j);
    printf("%lf\n", k);

    return 0;
}

void decompose(double x, long *int_part, double *frac_part)
{
    *int_part = (long)x;
    *frac_part = x - *int_part;
}
